package com.example.mapper;

import com.example.entity.Course;
import com.example.entity.example.CourseExample;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface CourseMapper {
    long countByExample(CourseExample example);

    int deleteByExample(CourseExample example);

    int deleteByPrimaryKey(String id);

    int insert(Course record);

    int insertSelective(Course record);

    List<Course> selectByExample(CourseExample example);

    Course selectByPrimaryKey(String id);

    int updateByExampleSelective(@Param("record") Course record, @Param("example") CourseExample example);

    int updateByExample(@Param("record") Course record, @Param("example") CourseExample example);

    int updateByPrimaryKeySelective(Course record);

    int updateByPrimaryKey(Course record);

    List<Course> selectByExampleWithLimit(@Param("example") CourseExample example, @Param("begin") Integer begin, @Param("limit") Integer limit);

    void insertSelectionCourse(@Param("courseId") String courseId, @Param("studentId") String studentId, @Param("date") Date date);

    void deleteSelectionCourse(@Param("courseId") String courseId, @Param("studentId") String studentId);

    List<Course> selectByTeacherId(@Param("teacherId") String teacherId);
}